#include "interpreter_send.h"

string network::interpreter_send::get_string()
{
	create_open_object("interpreter");
	create_attrib("name", _int->get_name());
	create_close_object("interpreter");
	
	string rw = get_header();
	list<model::album> &a = _int->get_albums();
	for(list<model::album>::iterator i = a.begin(); i != a.end(); ++i) {
		boost::shared_ptr<model::album> tmp(&(*i), 
			core::null_deleter());
		network::album_send snd(get_impl()->clone(), tmp);
		rw += snd.get_string();
	}
	rw += get_footer();
	return rw;
}
